#pragma once

#include "effectbase.h"
#include <osg\Vec4>
#include "marknodewithbillboard.h"

namespace VrDataCore
{
	class VRDATACORE_EXPORT NodeMarkEffect:public EffectBase
	{
	public:
		NodeMarkEffect(void);
	protected:
		virtual ~NodeMarkEffect(void);
		void setTextSetting(const osg::Vec3& relativepos,const osg::Vec4& color);
	public:
		void setMarkText(QString text);
		QString getMarkText();
		void setTextSetting(osg::Vec3 relativepos,osg::Vec4 color);
		void startAnimation(float upspeed,float rotatespeed);
		void endAnimation();
		void setMarkSize(QString size);
		QString getMarkSize();
		void setMarkColor(osg::Vec4 color);
		osg::Vec4 getMarkColor();
		virtual void reset(); 
		virtual void apply(CoreBase::ActorBase* bindingactor);
		virtual void unApply(CoreBase::ActorBase* bindingactor);
		virtual void buildPropertyMap();
		virtual osg::ref_ptr<CoreBase::ActorBase> clone();
	private:
		float										_markSize;
		osg::Vec4									_color;
		QString										_showText;
		osg::Vec3									_textRelativepos;
		osg::Vec4									_textColor;
		float										_upSpeed;
		float										_rotateSpeed;
		osg::ref_ptr<MarkNodeWithBillboard>			_markNode;
		osg::ref_ptr<osg::Node>						_billboardTextNode;
		osg::ref_ptr<osg::Node>						_pyramidNode;
	};
}